package com.saifan.wyy_ov.config;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.text.TextUtils;

import com.saifan.wyy_ov.MyApp;
import com.saifan.wyy_ov.ui.guide.GuideActivity;

import lomasky.ma.utils.SharedPrefUtil;

/**
 * @author WangLi
 * @version V1.0
 * @date 2014年11月25日 上午11:51:26
 * @Description 接口配置
 */

public class Api {
    /**
     * 赛帆演示版本
     */
      static String URL_IP = "";
      static String URL_ROOT = getUrlIp()+"/api/Customer";

    public static String getUrlIp() {
        if (TextUtils.isEmpty(URL_IP) ){
           URL_IP= SharedPrefUtil.getString(MyApp.myApp, "URL_IP", "");
        }
        return URL_IP;
    }

    public static void setUrlIp(String urlIp) {
        URL_IP = null;
        SharedPrefUtil.putString(MyApp.myApp, "URL_IP", urlIp);

    }

    public static String getTempXMBS() {
        if (TextUtils.isEmpty(tempXMBS)) {

            tempXMBS = SharedPrefUtil.getString(MyApp.myApp,"tempXMBS", "");
        }
        return tempXMBS;
    }

    public static void setTempXMBS(String tempXMBS) {
        Api.tempXMBS = tempXMBS;

        SharedPrefUtil.putString(MyApp.myApp,"tempXMBS", tempXMBS);


    }

    private static String tempXMBS = "";
    public static String getUrlRoot() {


        return getUrlIp()+"/api/Customer";
    }

    public static void setUrlRoot(String urlRoot) {
        URL_ROOT = urlRoot;
    }

    /**
     * 天景业主版
     */
    //public static final String URL_IP = "http://tianjwy.imwork.net:8080";
    //public static final String URL_ROOT ="http://tianjwy.imwork.net:8080/api/Customer";





    public static class StoreList {
        //StoreInfo  店铺信息  参数{"ID":""}
        public static final String STORE_INFO = "/StoreInfo";

        // 店铺列表
        public static final String STORELIST = "/StoreList";
        // 店铺列表
        public static final String STOREDETAIL = "/StoreDetail";
        // 获取店铺类别
        public static final String GETSTORETYPE = "/GetStoreType";
        // 收藏店铺
        public static final String COLLECTSUBMIT = "/CollectSubmit";
        // 取消收藏店铺
        public static final String CANCELCOLLECT = "/CancelCollect";
        // 商品详情
        public static final String GOODSDETAIL = "/GoodsDetail";
        // 获取商品类别
        public static final String GOODSTYPE = "/GoodsType";
        // 获取商品列表
        public static final String GOODSLIST = "/GoodsList";
        // 获取收藏店铺列表
        public static final String MYCOLLECT = "/MyCollect";
    }

    public static class GroupBuy {
        //团购列表
        public static final String SURROUNDGROUPBUY = "/SurroundGroupBuy";
        //商品详情

        public static final String GOODSDETAIL = "/GoodsDetail";
        //提交订单
        public static final String SUBMITORDER = "/SubmitOrder";
        //我的订单
        public static final String MYORDER = "/MyOrder";
        //删除订单
        public static final String DELETEORDER = "/DeleteOrder";
        //取消订单
        public static final String CANCELORDER = "/CancelOrder";
        //付款
        public static final String PAYMENT = "/Payment";
        //添加到购物车
        public static final String ADDSHOPPINGCART = "/AddShoppingCart";
        //		//查看购物车
        public static final String SHOPPINGCARTLIST = "/ShoppingCartList";

        //从购物车删除
        public static final String DELETESHOPPINGCART = "/DeleteShoppingCart";
    }

    public static class Comment {
        //获取评论列表
        public static final String GETEVALUATION = "/GetEvaluation";
        //提交评论接口
        public static final String EvaluationSubmit = "/EVALUATIONSUBMIT";


    }

    public static class Customer {
        //登录
        public static final String LOGIN = "/login";
        //注册
        public static final String REGISTER = "/RegisterForProprietor";
        ////注册
        //public static final String REGISTER = "/Register";
        //获取项目信息
        public static final String GETCOMMUNITY = "/GetCommunity";
        //获取注册用户权限
        public static final String TOURISTPERMISSIONSLIST = "/TouristPermissionsList";
        //获取通知列表
        public static final String NOTICE = "/Notice";
        //通知详情
        public static final String INFORMATIONRELEASE = "/InformationRelease/notice?id=";
        //获取广告列表
        public static final String ADVERT = "/Advert";
        //提交特约服务
        public static final String SPECIAL_SERVICE_SUBMIT = "/SpecialServiceSubmit";
        //获取特约服务项目
        public static final String SPECIAL_SERVICE_TYPE = "/SpecialServiceType";
        //获取特约服务列表
        public static final String SPECIAL_SERVICE_INFO = "/SpecialServiceInfo";
        //Visitor 访客管理
        public static final String VISITOR = "/Visitor";
        //费用查缴
        public static final String COST = "/Cost";
        // 便民工具
        public static final String CONVENIENT_TOOL = "/ConvenientTool";
        //我的消息参数{"FKGX_ZJ":"","Type":"""Page":""}  Type(1催费2收费3快递)
        public static final String MY_MESSAGE = "/MyMessage";

        //修改用户信息
        //参数{“UserName":"","NickName":"","WeChatID":""}
        public static final String EDIT_USER_INFO = "/EditUserInfo";
        //修改游客用户信息
        //参数{“UserName":"","NickName":"","WeChatID":""}
        public static final String EDITUSERINFOTOURIST = "/EditUserInfoTourist";
        //  修改密码
        //  参数{"UserName":"","OldPassword":"","Password":""}
        public static final String CHANGE_PASSWORD = "/ChangePassword";
        //  游客修改密码
        //  参数{"UserName":"","OldPassword":"","Password":""}
        public static final String CHANGEPASSWORDTOURIST = "/ChangePasswordTourist";

        //修改头像
        // 参数名 UserName
        public static final String UserName = "UserName";
        //修改注册用户头像
        // 参数名 UserName
        public static final String EDITHEADPHOTOTOURIST = "/EditHeadPhotoTourist";
        public static final String EDIT_HEAD_PHOTO = "/EditHeadPhoto";
        // 意见反馈参数{"Content":"","YXDID":"","FeedbackPeople":"","VersionType":"2","Contact":""}
        public static final String FEEDBACK_SUBMIT = "/FeedbackSubmit";


        public static final String FORGET_PASSWORD = "/ForgetPassword";
    }

    //收藏
    public static class Collection {
        //收藏
        public static final String COLLECTION = "/Collection";
        // 取消收藏
        public static final String CANCEL_COLLECTION = "/CancelCollection";

        //我的收藏 参数{"UserID":"","Page":"","Type":""}
        public static final String MY_COLLECTION = "/MyCollection";

    }

    //费用
    public static class Cost {
        //我的缴费信息 参数{"FKGX_ZJ":"","Page":""}
        public static final String MY_PAY_COST_INFO = "/MyPayCostInfo";
        // 我的缴费信息详情 参数{"WYSFMX_SKPZWJ":""}
        public static final String MY_PAY_COST_INFO_DETAIL = "/MyPayCostInfoDetail";
        //物业缴费
        public static final String PROPERTY_PAY = "/PayCost";
        //预缴物业管理费
        public static final String ADVANCE = "/Advance";

    }


    public static class Questionnaire {
        //获取问卷调查信息
        public static final String QUESTIONNAIRE_INFO = "/QuestionnaireInfo";

        //   提交问卷调查结果
        public static final String QUESTIONNAIRE_SUBMIT = "/QuestionnaireSubmit";
    }


    //报事
    public static class Matter {
        //提交报事参数  Matter
        public static final String MATTER = "Matter";
        //提交报事
        public static final String MATTER_SUBMIT = "/MatterSubmit";
        //报事信息{"FKGX_ZJ":"","Page":"","Type":""}
        public static final String MATTER_INFO = "/MatterInfo";


    }

    //Decorate 装修申请
    public static class Decorate {

        //参数名  Decorate
        public static final String DECORATE = "Decorate";
        //装修申请
        public static final String DECORATE_SUBMIT = "/DecorateSubmit";
        // DecorateInfo  装修申请列表 参数{"ZXSQ_FKGXWJ":""}
        public static final String DECORATE_INFO = "/DecorateInfo";

    }


    public static class RentalInfo {
        //参数名  RentalInfo
        public static final String RENTAL_INFO = "RentalInfo";
        //提交租售信息
        public static final String RENTAL_INFO_SUBMIT = "/RentalInfoSubmit";
        //租售信息列表
        public static final String RENTAL_INFO_LIST = "/RentalInfoList";
        //IsCollection  是否收藏
        public static final String IS_COLLECTION = "/IsCollection";
        //取当前客户发布的租售信息
        public static final String PERSONAL_RENTAL_INFO = "/PersonalRentalInfo";
    }

    //跳蚤市场
    public static class FleaMarket {
        // 参数名 FleaMarket
        public static final String FLEA_MARKET = "FleaMarket";
        //  跳蚤市场上传
        public static final String FLEA_MARKET_INFO_SUBMIT = "/FleaMarketInfoSubmit";
        /// 获取跳转市场信息
        public static final String FLEA_MARKET_INFO = "/FleaMarketInfo";
        /// 获取当前用户跳转市场信息
        public static final String PERSONAL_FLEA_MARKET_INFO = "/PersonalFleaMarketInfo";
    }

    //业主论坛
    public static class BBS {
        //获取论坛主题
        public static final String BBSTHEMES = "/BBSThemes";
        //获取论坛主题帖子列表
        public static final String POSTSLIST = "/PostsList";
        //发布帖子
        public static final String POSTSSUBMIT = "/PostsSubmit";
        //评论列表
        public static final String COMMENTSLIST = "/CommentsList";
        //提交评论
        public static final String COMMENTSSUBMIT = "/CommentsSubmit";
        //我的发布
        public static final String MYPOSTSLIST = "/MyPostsList";
        //删除帖子
        public static final String DELETEPOSTS = "/DeletePosts";
    }
}
